let mix = require('laravel-mix');
let path = require('path');
/*
 |--------------------------------------------------------------------------
 | Mix Asset Management
 |--------------------------------------------------------------------------
 |
 | Mix provides a clean, fluent API for defining some Webpack build steps
 | for your Laravel application. By default, we are compiling the Sass
 | file for the application as well as bundling up all the JS files.
 |
 */

mix
    .webpackConfig({
        resolve: {
            extensions: ['.js', '.vue', '.json'],
            alias: {
                '@': path.resolve( __dirname, 'resources/assets/js')
            }
        },
        output: {
            chunkFilename: 'js/[name].js'
        }
    })
    .js('resources/assets/js/app.js', 'public/js/app.js')
    .extract(['vue','element-ui','axios','lodash'], 'public/js/vendor.js')
    .sourceMaps()